﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace WindowsFormsApplication1.wtyczki
{
    public static class Flip
    {
        public static Bitmap vertical(Bitmap bm)
        {
            Bitmap bmTemp =new Bitmap (bm);
            for (int y = 1; y < bm.Height; y++)
            {
                for(int x=1;x<bm.Width;x++)
                {
                    
                        bmTemp.SetPixel(x, bm.Height - y, bm.GetPixel(x, y));
                    
                }
            }
            return bmTemp;
        }
        public static Bitmap horizontal(Bitmap bm)
        {
            Bitmap bmTemp = new Bitmap(bm);
            for (int x = 1; x < bm.Width; x++)
            {
                for (int y = 1; y < bm.Height; y++)
                {
                    bmTemp.SetPixel(bm.Width-x,y, bm.GetPixel(x, y));
                }
            }
            return bmTemp;
        }
    }
}
